package com.peakmain.wanandroid.mymodule.adapter;

import android.content.Context;

import com.peakmain.baselibrary.recyclerview.adapter.CommonRecyclerAdapter;
import com.peakmain.baselibrary.recyclerview.adapter.ViewHolder;
import com.peakmain.minemodule.R;
import com.peakmain.wanandroid.netmodule.bean.PublicAccountBean;

import java.util.List;

/**
 * author: peakmain
 * createdata：2019/7/26
 * mail: 2726449200@qq.com
 * desiption:
 */
public class PublicAccountAdapter extends CommonRecyclerAdapter<PublicAccountBean.DatasBean> {
    public PublicAccountAdapter(Context context, List<PublicAccountBean.DatasBean> data) {
        super(context, data, R.layout.recycler_view_public_account);
    }

    @Override
    public void convert(ViewHolder holder, PublicAccountBean.DatasBean item) {
          holder.setText(R.id.tv_title,item.getTitle());
          holder.setText(R.id.tv_data,String.format(mContext.getResources().getString(R.string.time),item.getNiceDate()));
    }
}
